package com.hsurosy.hsuchain.nft.order.infrastructure.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hsurosy.hsuchain.nft.order.domain.entity.TradeOrderStream;
import org.apache.ibatis.annotations.Mapper;

/**
 * 订单流水Mapper接口
 *
 * @Author Hsu琛君珩
 * @Date 2024-10-05 17:55
 * @Description
 * @Version: v1.0.0
 */
@Mapper
public interface OrderStreamMapper extends BaseMapper<TradeOrderStream> {

    /**
     * 根据流标识、流水类型和订单号查询订单流水记录
     *
     * @param streamIdentifier 流水幂等号，用于保证操作幂等性
     * @param streamType 流水类型，如支付、取消、超时等
     * @param orderId 订单号
     * @return 订单流水 {@link TradeOrderStream} 实例，如果没有匹配的流水则返回null
     */
    TradeOrderStream selectByIdentifier(String streamIdentifier, String streamType, String orderId);
}
